package cct.oogl;

/**
 * <p>Title: </p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2007</p>
 *
 * <p>Company: ANU</p>
 *
 * @author Dr. V. Vasilyev
 * @version 1.0
 */
public class Face {
   int Nv = 0; // # vertices on this face
   public int v[] = null; // vertex indices
   public int r, g, b, a = 255; //3 or 4 integers: RGB[A] values 0..255
   public float rf, gf, bf, af = 1; //  # 3 or 4 floats: RGB[A] values 0..1
   public Face() {
   }

   public Face(int _v[]) {
      v = _v;
      Nv = v.length;
   }

   public int getNVertices() {
      return Nv;
   }

   public void setColor(Color color) {
      rf = color.r;
      gf = color.g;
      bf = color.b;
      af = color.a;

      r = (int) (rf * 255.0f);
      g = (int) (gf * 255.0f);
      b = (int) (bf * 255.0f);
      a = (int) (af * 255.0f);
   }
}
